package main

import (
	"fmt"
	"strings"
)

// 可变参数函数联接字符串
func joinstr(element ...string) string {

	return strings.Join(element, "-")
}

func main() {
	//零参数
	fmt.Println(joinstr())

	//多个参数
	fmt.Println(joinstr("a", "b"))
	fmt.Println(joinstr("hello", "world"))
	fmt.Println(joinstr("坚决", "收复", "台湾"))
}
